<template>
  <div class="pa-12">
    <div class="flex-start m-t-10">
      <div style="width: 100px; text-align: right" class="m-r-10">登陆账号</div>
      <el-input v-model="info.account" />
    </div>
    <div class="flex-start m-t-10">
      <div style="width: 100px; text-align: right" class="m-r-10">登陆密码</div>
      <el-input v-model="info.password" />
    </div>
    <div class="dividing-line m-t-20 m-b-20"></div>
    <div class="flex-end">
      <el-button size="small" type="primary" plain @click="hide"
        >取消</el-button
      >
      <el-button
        size="small"
        type="primary"
        @click="doConfirm"
        :loading="submitLoading"
        >确定</el-button
      >
    </div>
  </div>
</template>

<script>
import { updateLoginAccount } from "@/api/business/filling-team";
import { msgSuccess } from "@/util/common-util";

export default {
  name: "contract-customer-login-account",
  props: {
    info: {
      type: Object,
    },
  },
  data() {
    return {
      showSelectFillingStationFlag: false,
      submitLoading: false,
      installDate: "",
      installTime: "",
    };
  },
  methods: {
    hide() {
      this.$emit("hide", 0);
    },
    doConfirm() {
      this.submitLoading = true;
      let params = {
        ...this.info,
      };
      updateLoginAccount(params)
        .then((res) => {
          msgSuccess();
          this.$emit("hide", 1);
          this.submitLoading = false;
        })
        .catch((err) => {
          this.submitLoading = false;
        });
    },
  },
};
</script>

<style lang="scss" scoped></style>
